﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Yipusoft.FireProjects.BLL;
using Yipusoft.FireProjects.Model;

public partial class BasicBase_FireProject_FireProjectStat : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void lkbQurey_Click(object sender, EventArgs e)
    {
        if (CustomValidator1.IsValid)
        {
            string departmentid = "departmentid='" + UCDepartment1.GetDepartmentID() + "'";
            lblUpdate.Text = FireProject.GetUpdateCount(Convert.ToDateTime(txtTimeStart.Text), Convert.ToDateTime(txtTimeEnd.Text), departmentid).ToString();
            lblAdd.Text = FireProject.GetAddCount(Convert.ToDateTime(txtTimeStart.Text), Convert.ToDateTime(txtTimeEnd.Text), departmentid).ToString();
        }
    }
    protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args)
    {
        if (Convert.ToDateTime(txtTimeStart.Text) < Convert.ToDateTime(txtTimeEnd.Text))
        {
            args.IsValid = true;
        }
        else
        {
            args.IsValid = false;
        }
    }
}
